import { ORDER_LIST, ORDER_CONFIRM, ORDER_SUBMIT, ORDER_INFO,
         ORDER_CANCEL, ORDER_PAY, ORDER_SETTLEMENT, ORDER_DELETE } from '@constants/order'

const INITIAL_STATE = {
  orderInfo: {}
}

export default function order(state = INITIAL_STATE, action) {
  switch(action.type) {
    case ORDER_LIST: {
      return { ...state }
    }
    case ORDER_CONFIRM: {
      return { ...state }
    }
    case ORDER_SUBMIT: {
      return { ...state }
    }
    case ORDER_CANCEL: {
      return { ...state }
    }
    case ORDER_PAY: {
      return { ...state }
    }
    case ORDER_SETTLEMENT: {
      return { ...state }
    }
    case ORDER_DELETE: {
      return { ...state }
    }
    case ORDER_INFO: {
      return {
        ...state,
        orderInfo: action.payload }
    }
    default:
      return state
  }
}
